% tsp fitness function
% calculate the distance of visited city sequence
function result = fitness_func(ith_seed, distance_matrix)
total = 0;
len = length(ith_seed);
for i = 1:len-1
    total = total + distance_matrix(ith_seed(i),ith_seed(i+1));
end
result = total;
end